<?php

class  News_model extends CI_Model{
    public function __construct(){
    }
//
    public function  get_news($slug= false){
        if ($slug == false){
            $query = $this->db->get('news');
            return $query->result_array();
        }

        $query = $this->db->get_where('news',array('slug'=>$slug));
        return $query->row_array();
    }

    




}